package com.gwtplatform.samples.tab.client.aboutdialog;

import com.guit.client.GuitPresenter;
import com.guit.client.StandaloneView;
import com.guit.client.binder.GuitBinder;
import com.guit.client.binder.ViewField;
import com.guit.client.binder.ViewHandler;
import com.gwtplatform.samples.tab.client.aboutdialog.AboutDialogPresenter.AboutDialogBinder;

@StandaloneView
public class AboutDialogPresenter extends GuitPresenter<AboutDialogBinder> {

    public static interface AboutDialogBinder extends GuitBinder<AboutDialogPresenter> {
    }
    
    @ViewField
    DialogBoxI dialog;
    
    public void show() {
        getView();
        dialog.show();
        dialog.center();
    }
    
    @ViewHandler
    public void okButton$click() {
        dialog.hide();
    }
}
